Many microcontrollers with embedded non-volatile memory (NVM) use NOR flash technology. Bits can be written to NOR flash memory from 1 to 0 by a program operation. The program operation is relatively fast and is performed on individual bits. A page of NOR flash memory can be programmed multiple times without erasing. However, the individual bits in the page can only be set from 0 to 1 by an erase operation. The erase operation is slow and typically performed on blocks of bits.